<?php
/* [$WindsForce] (C)Hunzhiwange.COM Since 2014.07.01.
   家居商家VIP头部广告模型($$)*/

!defined('Q_PATH') && exit;

class JiajucompanybannerModel extends CommonModel{

	static public function init__(){
		return array(
			'table_name'=>'jiajucompanybanner',
			'check'=>array(
				'jiajucompanybanner_filename'=>array(
					array('require',Q::L('图片地址不能为空','__APPJIAJU_COMMON_LANG__@Model')),
					array('max_length',100,Q::L('图片地址不能超过100个字符','__APPJIAJU_COMMON_LANG__@Model')),
				),
				'jiajucompanybanner_filetitle'=>array(
					array('require',Q::L('图片标题不能为空','__APPJIAJU_COMMON_LANG__@Model')),
					array('max_length',25,Q::L('图片标题不能超过25个字符','__APPJIAJU_COMMON_LANG__@Model')),
				),
				'jiajucompanybanner_link'=>array(
					array('require',Q::L('图片链接不能为空','__APPJIAJU_COMMON_LANG__@Model')),
					array('max_length',200,Q::L('图片链接不能超过200个字符','__APPJIAJU_COMMON_LANG__@Model')),
				),
			),
		);
	}

	static function F(){
		$arrArgs=func_get_args();
		return ModelMeta::instance(__CLASS__)->findByArgs($arrArgs);
	}

	static function M(){
		return ModelMeta::instance(__CLASS__);
	}
	
	protected function beforeSave_(){
		$this->jiajucompanybanner_filename=C::strip($this->jiajucompanybanner_filename);
		$this->jiajucompanybanner_filetitle=C::text($this->jiajucompanybanner_filetitle);
		$this->jiajucompanybanner_link=C::strip($this->jiajucompanybanner_link);
	}

}
